home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: in1.uu.net!world!mv!usenet
- From: ENGR@GSSI.MV.COM (Michael Furman)
- Subject: Re: Passing multidemensional arrays to functions?
- Message-ID: <Don82L.KCr@mv.mv.com>
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- Organization: GSSI
- Date: Fri, 22 Mar 1996 00:30:21 GMT
- References: <4islec$m41@matrix.mdn.com>
- X-Newsreader: WinVN 0.99.7
- X-Nntp-Posting-Host: gssi.mv.com
-
- In article <4islec$m41@matrix.mdn.com>, jschell@aggie.mdn.com says...
- >
- >I am trying to pass a variable to a function but continue to get errors
- >no matter
- >what declaration I give the variable in the prototype statement.
- >
- >The variable:
- > float variable[1][2]
- >
- >Can you make a sugestion as to what it should pass as?
-
- What is "float variable[1][2]" ? If this is a declaration of array 1 * 2 of
- float numbers and you want to pass this wole array - it may be:
-
- void func(float formal_variable[1][2])
- or
- void func(float formal_variable[][2])
-
- If variable[1][2] is just one element of some array and you want to pass it
- value:
- void func(float value)
-
-
-
-
- >
- >Thanks
- >John
-
- --
- <<< If you received it by E-mail: it is a copy of post to the newsgroup >>>
- ---------------------------------------------------------------
- Michael Furman, (603)893-1109
- Geophysical Survey Systems, Inc. fax:(603)889-3984
- 13 Klein Drive - P.O. Box 97 engr@gssi.mv.com
- North Salem, NH 03073-0097 71543.1334@compuserve.com
- ---------------------------------------------------------------
-
-